Skip to content

Enhance/wind farm parameters#15

Open
Zetison wants to merge 9 commits into
mainfrom
enhance/WindFarmParameters
Open

Enhance/wind farm parameters#15
Zetison wants to merge 9 commits into
mainfrom
enhance/WindFarmParameters

Conversation

@Zetison

@Zetison Zetison commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

This PR enables more options from sampling the wind_power_timeseries repository. The PR depends on this MR to be merged with main.

  • Extended WindFarmParameters to include an optional turbine_power_curve argument, which allows users to specify a custom power curve for the wind turbine.
    The turbine_power_curve is expected to be a DataFrame with columns wind_speed and power_curve, where wind_speed represents the wind speed values (in m/s) and power_curve represents the corresponding power output of the turbine at those wind speeds.
  • The parameters sigma and wakeloss were also added to WindFarmParameters to enable all options of the wind_power_timeseries repository.
  • The shape parameter was corrected from a string to a float.

@Zetison Zetison requested a review from Copilot June 5, 2026 08:07
@Zetison Zetison self-assigned this Jun 5, 2026
@Zetison Zetison added bug Something isn't working enhancement New feature or request labels Jun 5, 2026
@Zetison Zetison marked this pull request as draft June 5, 2026 08:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands the wind-power sampling interface by extending WindFarmParameters and wiring the new options through to the Python wind_power_timeseries call, with corresponding test updates.

Changes:

  • Extend WindFarmParameters with turbine_power_curve, sigma, and wakeloss, and change orientation/shape defaults to nothing with shape now numeric.
  • Convert a Julia DataFrame power curve into a Pandas Series before calling the Python sampler.
  • Update/extend wind-power tests and test utilities to reflect the new parameters and a shorter test horizon.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/datastructures.jl Adds new wind parameters, validates them, and passes them through to the Python sampler.
src/utils.jl Adds to_pandas_series helper for converting a power-curve DataFrame to Pandas.
test/utils.jl Updates wind test graph helper to accept/pass new parameters and uses a shorter horizon.
test/test_windpower.jl Updates parameter tests, adds validation tests, and refactors wind mathematical formulation tests.
test/runtests.jl Adds DataFrames import for test usage.
test/Project.toml Adds DataFrames as a test dependency.
NEWS.md Updates release notes describing the wind parameter extensions.
docs/src/library/internals/methods-EMLI.md Adds to_pandas_series to the internal methods list.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/datastructures.jl Outdated
Comment thread test/test_windpower.jl Outdated
Comment thread test/test_windpower.jl
Comment thread src/utils.jl

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Comment thread src/datastructures.jl Outdated
Comment thread src/datastructures.jl Outdated
Comment thread src/datastructures.jl
Comment thread src/utils.jl Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Comment thread src/datastructures.jl
Comment thread src/datastructures.jl

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Comment thread src/datastructures.jl
@Zetison Zetison marked this pull request as ready for review June 24, 2026 13:57
@Zetison Zetison requested a review from JulStraus June 24, 2026 16:17

@JulStraus JulStraus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It generally looks good. Only a few minor comments. Specifically, I think it is important that we think where we describe the parameters.

Comment thread src/datastructures.jl Outdated
Comment thread src/datastructures.jl Outdated
Comment thread src/datastructures.jl Outdated
Comment on lines +129 to +138
- **`turbine_power_curve::Union{String, DataFrame, Nothing}`** optional power curve input
(e.g. curve name or dataset-based interpolated curve), default: `nothing`.
For `String` input, available options are: "VestasV80", "Tradewind_lowland", "Tradewind_upland",
"Tradewind_offshore", "Tradewind_offshore_2030", "IEA_15MW_240_RWT", "IEA_10MW_198_RWT",
"NREL_5MW_126_RWT", and "DTU_10MW_178_RWT".
For `DataFrame` input, the `DataFrame` must contain two columns: "wind_speed" and "power_curve", where
"wind_speed" is the wind speed in m/s and "power_curve" is the normalized power output (both must be non-negative)
corresponding to each wind speed (values are normalized by default by the `wind_power_timeseries` module).
Values are set to zero for wind speeds outside the range of the provided power curve.
Must have at least 2 rows to allow for interpolation.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would think it is beneficial here to use a note admonition with two separate paragraphs for the String and DataFrame input.

Comment thread src/datastructures.jl
Comment on lines +139 to +140
- **`sigma::Union{Real, Nothing}`** optional Ninja smoothing parameter, default: `nothing`.
- **`wakeloss::Union{Real, Nothing}`** optional Ninja wakeloss parameter, default: `nothing`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do I see it correctly, that it is only required when using Ninja? While we have not changed it in this PR, I would say that it would be beneficial to highlight which parameters are required for each method in the documentation or more detailed in the docstring here. That can be set as a warning admonition.

Comment thread src/datastructures.jl Outdated
Zetison and others added 2 commits June 26, 2026 13:44
Co-authored-by: Julian Straus <104911227+JulStraus@users.noreply.github.com>
@Zetison Zetison requested a review from JulStraus June 26, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants